﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using RaytracerLib;
using RaytracerLib.Layers;
using RaytracerLib.MathLib;
using RaytracerLib.RenderableObjects;
using RaytracerLib.Postprocessing.LightCorrector;
using RaytracerLib.Resamplers;
using RaytracerLib.Samplers;
using RaytracerLib.Volumes;
using TomanuExtensions;
using RaytracerLib.ShadowTesters;
using RaytracerLib.Attenuations;
using System.Reflection;
using RaytracerLib.Layers.Interpolators;
using RaytracerLib.Layers.OverlayCorrectors;
using RaytracerLib.Lights;
using System.Globalization;
using RaytracerLib.MathLib.Polynomials;
using RaytracerLib.UVMappers;
using RaytracerLib.MathLib.RootFinders;
using YAXLib;
using RaytracerLib.Cameras;
using RaytracerLib.Postprocessing;

namespace Raytracer.Generator
{
    partial class TestScenes
    {
        private static void Generate_0001_0010()
        {
            List.Add(new TestScene()
            {
                Name = "earth_scene",
                Index = 1,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "procedural_layer_scene",
                Index = 2,
                GetScene = () =>
                {
                    Scene scene = Scenes.Procedural_Layer();
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "two_spheres_scene",
                Index = 3,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "ambient_light_red",
                Index = 6,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderOptions.AmbientColor = ColorFloat.SRGB_Red;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "height_800",
                Index = 7,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.ActiveCamera.Film.Height = 800;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "width_800",
                Index = 8,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.ActiveCamera.Film.Width = 800;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "max_ray_depth_two",
                Index = 9,
                GetScene = () =>
                {
                    Scene scene = Scenes.Procedural_Layer();
                    Fast(scene);
                    scene.ActiveCamera.Film.MaxRayDepth = 2;
                    return scene;
                }
            });
        }

        private static void Generate_0021_0047()
        {
            // 21-47
            {
                int i = 21;

                foreach (var overlay in EnumExtensions.GetValues<OverlayMethod>())
                {
                    var oc = overlay;
                    foreach (var interp in EnumExtensions.GetValues<InterpolationMethod>())
                    {
                        var ic = interp;
                        List.Add(new TestScene()
                        {
                            Name = String.Format("texture_{0}_{1}_zoom1",
                                oc.ToString().ToLower(), ic.ToString().ToLower()),
                            Path = "Interpolation", 
                            Index = i++,
                            GetScene = () =>
                            {
                                Scene scene = Scenes.Plane(new Vector3(248.8, 5, 180),
                                    250, oc, ic);
                                Fast(scene);
                                return scene;
                            }
                        });

                        List.Add(new TestScene()
                        {
                            Name = String.Format("texture_{0}_{1}_zoom2",
                                oc.ToString().ToLower(), ic.ToString().ToLower()),
                            Index = i++,
                            Path = "Interpolation", 
                            GetScene = () =>
                            {
                                Scene scene = Scenes.Plane(new Vector3(1, 5, 0.5),
                                    250, oc, ic);
                                Fast(scene);
                                return scene;
                            }
                        });

                        List.Add(new TestScene()
                        {
                            Name = String.Format("texture_{0}_{1}",
                                oc.ToString().ToLower(), ic.ToString().ToLower()),
                            Index = i++,
                            Path = "Interpolation", 
                            GetScene = () =>
                            {
                                Scene scene = Scenes.Plane(new Vector3(0, 5, 0), 1,
                                    oc, ic);
                                Fast(scene);
                                return scene;
                            }
                        });
                    }
                }
            }
        }

        private static void Generate_0048_0059()
        {
            // 48-53
            {
                int i = 48;

                foreach (var interp in EnumExtensions.GetValues<InterpolationMethod>())
                {
                    var ic = interp;
                    List.Add(new TestScene()
                    {
                        Name = String.Format("interpolation_{0}",
                            ic.ToString().ToLower()),
                        Path = "Interpolation", 
                        Index = i++,
                        GetScene = () =>
                        {
                            Scene scene = Scenes.Sphere_Earth();
                            scene.ActiveCamera.Film.MaxRayDepth = 2;
                            scene.RenderableObjects["sphere"].RotateAroundRight(-30);
                            scene.RenderableObjects["sphere"].DefaultMaterial =
                                TestMaterials.EarthSimple("earth_simple");
                            var layer = scene.RenderableObjects["sphere"].DefaultMaterial.Diffuse;
                            var arrays = Layer.GetAllArrays(layer as Layer);
                            foreach (var array in arrays)
                                array.InterpolationMethod = ic;
                            return scene;
                        }
                    });

                    List.Add(new TestScene()
                    {
                        Name = String.Format("interpolation_{0}_zoom",
                            ic.ToString().ToLower()),
                        Path = "Interpolation", 
                        Index = i++,
                        GetScene = () =>
                        {
                            Scene scene = Scenes.Sphere_Earth();
                            scene.ActiveCamera.Film.MaxRayDepth = 2;
                            scene.RenderableObjects["sphere"].RotateAroundRight(-30);
                            (scene.ActiveCamera as PerspectiveCamera).MinimalPlaneDistant = 0.1;
                            scene.ActiveCamera.Pos = new Vector3(0, 0, -1.8);
                            scene.RenderableObjects["sphere"].DefaultMaterial =
                                TestMaterials.EarthSimple("earth_simple");
                            var layer = scene.RenderableObjects["sphere"].DefaultMaterial.Diffuse;
                            var arrays = Layer.GetAllArrays(layer as Layer);
                            foreach (var array in arrays)
                                array.InterpolationMethod = ic;
                            return scene;
                        }
                    });
                }
            }

            List.Add(new TestScene()
            {
                Name = "set_look_at",
                Path = "Camera", 
                Index = 54,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    scene.ActiveCamera.SetLookAt(scene.RenderableObjects["sphere1"].Pos);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "camera_rotate_x",
                Path = "Camera", 
                Index = 55,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    scene.ActiveCamera.RotateAroundRight(-5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "camera_rotate_y",
                Path = "Camera", 
                Index = 56,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    scene.ActiveCamera.RotateAroundUp(5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "camera_rotate_z",
                Path = "Camera", 
                Index = 57,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    scene.ActiveCamera.RotateAroundForward(5);
                    return scene;
                }
            });
        }

        private static void Generate_0059_0069()
        {
            // 59-64
            {
                int i = 59;
                foreach (var interp in EnumExtensions.GetValues<InterpolationMethod>())
                {
                    var ic = interp;
                    List.Add(new TestScene()
                    {
                        Name = String.Format("bump_interpol_{0}",
                            ic.ToString().ToLower()),
                        Path = "Interpolation", 
                        Index = i++,
                        GetScene = () =>
                        {
                            Scene scene = Scenes.Sphere_Earth();
                            var layer = scene.RenderableObjects["sphere"].DefaultMaterial.Tangents;
                            var arrays = Layer.GetAllArrays(layer as Layer);
                            foreach (var array in arrays)
                                array.InterpolationMethod = ic;
                            return scene;
                        }
                    });

                    List.Add(new TestScene()
                    {
                        Name = String.Format("bump_interpol_{0}_zoom",
                            ic.ToString().ToLower()),
                        Path = "Interpolation", 
                        Index = i++,
                        GetScene = () =>
                        {
                            Scene scene = Scenes.Sphere_Earth();
                            scene.RenderableObjects["sphere"].DefaultMaterial =
                                TestMaterials.EarthBump("earth");
                            var layer = scene.RenderableObjects["sphere"].DefaultMaterial.Tangents;
                            var arrays = Layer.GetAllArrays(layer as Layer);
                            foreach (var array in arrays)
                                array.InterpolationMethod = ic;
                            scene.ActiveCamera.Pos = scene.ActiveCamera.Pos + Vector3.YAXIS * 4;
                            scene.ActiveCamera.SetLookAt(Vector3.ZERO);
                            scene.ActiveCamera.Translate(scene.ActiveCamera.Forward * 4.2);
                            (scene.ActiveCamera as PerspectiveCamera).MinimalPlaneDistant = 0.1;
                            return scene;
                        }
                    });
                }
            }

            List.Add(new TestScene()
            {
                Name = "light_off",
                Index = 65,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.Lights["light1"].On = false;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "light_color",
                Index = 66,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.Lights["light1"].Color = ColorFloat.SRGB_Green;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere_pos",
                Index = 68,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].Pos = new Vector3(0, 1, 0);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere_radius",
                Index = 69,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    (scene.RenderableObjects["sphere"] as SphereObject).Radius = 2;
                    return scene;
                }
            });
        }

        private static void Generate_0070_0079()
        {
            List.Add(new TestScene()
            {
                Name = "sphere_rotate_z",
                Path = "Transforms", 
                Index = 70,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundForward(5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere_rotate_y",
                Path = "Transforms", 
                Index = 71,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundUp(5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere_rotate_x",
                Path = "Transforms", 
                Index = 72,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundRight(5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_move",
                Index = 73,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["plane"].Pos = new Vector3(0, -1, 0);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_create_1",
                Index = 74,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    var plane = new PlaneObject(new Vector3(0, 1, -0.2), 0, Vector3.XAXIS);
                    plane.DefaultMaterial = scene.RenderableObjects["plane"].DefaultMaterial;
                    scene.RenderableObjects["plane"] = plane;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_create_2",
                Index = 75,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    var plane = new PlaneObject(new Vector3(0, 1, -0.2), Vector3.XAXIS)
                    {
                        Pos = new Vector3(0, -0.5, 0)
                    };
                    plane.DefaultMaterial = scene.RenderableObjects["plane"].DefaultMaterial;
                    scene.RenderableObjects["plane"] = plane;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_create_3",
                Index = 76,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    var plane = new PlaneObject(new Vector3(0, 0, 0),
                        new Vector3(1, 1, 0), new Vector3(0, 0, -1));
                    plane.DefaultMaterial = scene.RenderableObjects["plane"].DefaultMaterial;
                    scene.RenderableObjects["plane"] = plane;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_rotate_x",
                Path = "Transforms", 
                Index = 77,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["plane"].RotateAroundRight(3);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_rotate_z",
                Path = "Transforms", 
                Index = 78,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["plane"].RotateAroundForward(3);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane_rotate_y",
                Path = "Transforms", 
                Index = 79,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.RenderableObjects["plane"].RotateAroundUp(3);
                    return scene;
                }
            });
        }

        private static void Generate_0080_0089()
        {
            // 80-83
            {
                int i = 80;
                foreach (var lc in EnumExtensions.GetValues<ToneMappingMethod>())
                {
                    var lcc = lc;
                    List.Add(new TestScene()
                    {
                        Name = String.Format("light_adjustment_{0}",
                            lcc.ToString().ToLower()),
                        Path = "Light adjustment", 
                        Index = i++,
                        GetScene = () =>
                        {
                            Scene scene = Scenes.Light_Adjustment();
                            Fast(scene);
                            scene.ActiveCamera.Film.Postprocessors.Add(ToneMapper.Create(lcc));
                            scene.ActiveCamera.Film.Width = 100;
                            scene.ActiveCamera.Film.Height = 100;
                            scene.ActiveCamera.Pos += Vector3.ZAXIS * 7;
                            return scene;
                        }
                    });
                }
            }

            List.Add(new TestScene()
            {
                Name = "setting right",
                Index = 85,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Earth();
                    Fast(scene);
                    scene.ActiveCamera.Right = new Vector3(
                        0.989355107841348, 0.0285390896492696, -0.142695448246348);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "setting forward",
                Index = 86,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    scene.ActiveCamera.Forward = new Vector3(
                        0.1455213750218, -0.194028500029066, 0.970142500145332);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "setting up",
                Index = 87,
                GetScene = () =>
                {
                    Scene scene = Scenes.Spheres_Two_above_plane();
                    Fast(scene);
                    scene.ActiveCamera.Up = new Vector3(
                            0, 0.98058067569092, 0.196116135138184);
                    return scene;
                }
            });
        }

        private static void Generate_0090_0099()
        {
            List.Add(new TestScene()
            {
                Name = "sphere_inside",
                Path = "Inside", 
                Index = 97,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Inside();
                    scene.RenderableObjects[0].DefaultMaterial.ReflectionTransmittance = null;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere_inside_oneside",
                Path = "Inside", 
                Index = 98,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Inside();
                    scene.RenderableObjects[0].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects[0].OneSide = true;
                    return scene;
                }
            });
        }

        private static void Generate_0100_0109()
        {
            List.Add(new TestScene()
            {
                Name = "fresnel 1-1 equation test",
                Path = "Refraction", 
                Index = 100,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        scene.RenderOptions.EnvironmentRefractionIndice;
                    scene.RenderableObjects["sphere"].DefaultMaterial.ReflectionTransmittance =
                        VolumesFactory.Solid(1);
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance =
                        VolumesFactory.Solid(1);

                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1 sphere transmitance 1",
                Path = "Refraction", 
                Index = 101,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        scene.RenderOptions.EnvironmentRefractionIndice;
                    scene.RenderableObjects["sphere"].DefaultMaterial.ReflectionTransmittance =
                        VolumesFactory.Solid(0.8);
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance =
                        VolumesFactory.Solid(0.8);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1 sphere transmitance 2",
                Path = "Refraction", 
                Index = 102,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        scene.RenderOptions.EnvironmentRefractionIndice;
                    scene.RenderableObjects["sphere"].DefaultMaterial.ReflectionTransmittance =
                        VolumesFactory.Solid(0.6);
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance =
                        VolumesFactory.Solid(0.6);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1 sphere transmitance 3",
                Path = "Refraction", 
                Index = 103,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        scene.RenderOptions.EnvironmentRefractionIndice;
                    scene.RenderableObjects["sphere"].DefaultMaterial.ReflectionTransmittance =
                        VolumesFactory.Solid(0);
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance =
                        VolumesFactory.Solid(0);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1 sphere transmitance 4",
                Path = "Refraction", 
                Index = 104,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        scene.RenderOptions.EnvironmentRefractionIndice;
                    scene.RenderableObjects["sphere"].DefaultMaterial.ReflectionTransmittance =
                        VolumesFactory.Solid(0.8);
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance =
                        VolumesFactory.Solid(0);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1 sphere transmitance 5",
                Path = "Refraction", 
                Index = 105,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        scene.RenderOptions.EnvironmentRefractionIndice;
                    scene.RenderableObjects["sphere"].DefaultMaterial.ReflectionTransmittance =
                        VolumesFactory.Solid(0);
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance =
                        VolumesFactory.Solid(0.8);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.5 sphere",
                Path = "Refraction", 
                Index = 106,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1.3-1 sphere",
                Path = "Refraction", 
                Index = 107,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderOptions.EnvironmentRefractionIndice =
                        RefractiveIndices.Water;
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        RefractiveIndices.Air;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1.3-1 sphere side",
                Path = "Refraction", 
                Index = 108,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderOptions.EnvironmentRefractionIndice =
                        RefractiveIndices.Water;
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Air";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        RefractiveIndices.Air;
                    scene.RenderableObjects["sphere"].Pos = new Vector3(0, 0, -4);
                    scene.ActiveCamera.Pos = new Vector3(-2, -6, -6);
                    scene.ActiveCamera.SetLookAt(scene.RenderableObjects["sphere"].Pos);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.3 sphere side",
                Path = "Refraction", 
                Index = 109,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderOptions.EnvironmentRefractionIndice =
                        RefractiveIndices.Air;
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Water";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        RefractiveIndices.Water;
                    scene.RenderableObjects["sphere"].Pos = new Vector3(0, 0, -4);
                    scene.ActiveCamera.Pos = new Vector3(-2, -6, -6);
                    scene.ActiveCamera.SetLookAt(scene.RenderableObjects["sphere"].Pos);
                    return scene;
                }
            });
        }

        private static void Generate_0110_0119()
        {
            List.Add(new TestScene()
            {
                Name = "refraction 1-1.3 sphere flare",
                Path = "Refraction", 
                Index = 111,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction1();
                    Fast(scene);
                    scene.RenderOptions.EnvironmentRefractionIndice =
                        RefractiveIndices.Air;
                    scene.RenderableObjects["sphere"].DefaultMaterial.Name = "Water";
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionIndice =
                        RefractiveIndices.Water;
                    scene.RenderableObjects["sphere"].DefaultMaterial.RefractionTransmittance = LayersFactory.Solid(0.6);
                    scene.RenderableObjects["t1"].DefaultMaterial = TestMaterials.Solid("Blue", ColorFloat.SRGB_Blue);
                    scene.RenderableObjects["t2"].DefaultMaterial = scene.RenderableObjects["t1"].DefaultMaterial;
                    scene.RenderableObjects["sphere"].Pos = new Vector3(0, 0, -10);
                    scene.ActiveCamera.Pos = new Vector3(0, 0, -14);
                    scene.Lights["light4"].Pos = new Vector3(1.5, 1.5, -9.5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.5 sphere planes 1",
                Path = "Refraction", 
                Index = 112,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction2();
                    Fast(scene);
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane3"].DefaultMaterial.ReflectionTransmittance = null;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.5 sphere planes 2",
                Path = "Refraction", 
                Index = 113,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction2();
                    Fast(scene);
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane3"].DefaultMaterial.ReflectionTransmittance = null;
                    (scene.RenderableObjects["sphere1"] as SphereObject).Radius = 1.5;
                    (scene.RenderableObjects["sphere2"] as SphereObject).Radius = 3;
                    scene.RenderableObjects["sphere1"].Pos = new Vector3(4, 3.2, -10);
                    scene.RenderableObjects["sphere2"].Pos = new Vector3(4, 3.2, -10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.5 sphere planes 3",
                Path = "Refraction", 
                Index = 114,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Refraction2();
                    Fast(scene);
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane3"].DefaultMaterial.ReflectionTransmittance = null;
                    (scene.RenderableObjects["sphere1"] as SphereObject).Radius = 3;
                    (scene.RenderableObjects["sphere2"] as SphereObject).Radius = 3;
                    scene.RenderableObjects["sphere1"].Pos = new Vector3(6, 3.2, -10);
                    scene.RenderableObjects["sphere2"].Pos = new Vector3(3, 2.6, -8);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.5 thin planes",
                Path = "Refraction", 
                Index = 115,
                GetScene = () =>
                {
                    Scene scene = Scenes.Planes_Refraction(4);
                    Fast(scene);
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1-1.5 thick planes",
                Path = "Refraction", 
                Index = 116,
                GetScene = () =>
                {
                    Scene scene = Scenes.Planes_Refraction(0.3);
                    Fast(scene);
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.ActiveCamera.Pos = new Vector3(0, 5, -33);
                    scene.ActiveCamera.SetLookAt(new Vector3(0, 1, -22));
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1.5-1 thin planes",
                Path = "Refraction", 
                Index = 117,
                GetScene = () =>
                {
                    Scene scene = Scenes.Planes_Refraction(4, RefractiveIndices.Air, "Air");
                    Fast(scene);
                    scene.RenderOptions.EnvironmentRefractionIndice =
                        RefractiveIndices.OpticGlass1;
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.ActiveCamera.Pos = new Vector3(0, 6, -31);
                    scene.ActiveCamera.SetLookAt(new Vector3(0, 1, -28));
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "refraction 1.5-1 thick planes",
                Path = "Refraction", 
                Index = 118,
                GetScene = () =>
                {
                    Scene scene = Scenes.Planes_Refraction(0.2, RefractiveIndices.Air, "Air");
                    Fast(scene);
                    scene.RenderOptions.EnvironmentRefractionIndice =
                        RefractiveIndices.OpticGlass1;
                    scene.RenderableObjects["plane1"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects["plane2"].DefaultMaterial.ReflectionTransmittance = null;
                    scene.ActiveCamera.Pos = new Vector3(0, 5, -31);
                    scene.ActiveCamera.SetLookAt(new Vector3(0, 1, -28));
                    return scene;
                }
            });
        }

        private static void Generate_0120_0129()
        {
            List.Add(new TestScene()
            {
                Name = "plane bump center",
                Path = "Bump", 
                Index = 120,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(true);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump moved",
                Path = "Bump", 
                Index = 121,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump center rotate 1",
                Path = "Bump", 
                Index = 122,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(true);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump center rotate 2",
                Path = "Bump", 
                Index = 123,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(true);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump center rotate 3",
                Path = "Bump", 
                Index = 124,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(true);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump center rotate 4",
                Path = "Bump", 
                Index = 125,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(true);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump center rotate 5",
                Path = "Bump", 
                Index = 126,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump center rotate 6",
                Path = "Bump", 
                Index = 127,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(true);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump moved rotate 1",
                Path = "Bump", 
                Index = 128,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump moved rotate 2",
                Path = "Bump", 
                Index = 129,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });
        }

        private static void Generate_0130_0139()
        {
            List.Add(new TestScene()
            {
                Name = "plane bump moved rotate 3",
                Path = "Bump", 
                Index = 130,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump moved rotate 4",
                Path = "Bump", 
                Index = 131,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump moved rotate 5",
                Path = "Bump", 
                Index = 132,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump moved rotate 6",
                Path = "Bump", 
                Index = 133,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back center",
                Path = "Bump", 
                Index = 134,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved",
                Path = "Bump", 
                Index = 135,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back center rotate 1",
                Path = "Bump", 
                Index = 136,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back center rotate 2",
                Path = "Bump", 
                Index = 137,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(180);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back center rotate 3",
                Path = "Bump", 
                Index = 138,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(180);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back center rotate 4",
                Path = "Bump", 
                Index = 139,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });
        }

        private static void Generate_0140_0149()
        {
            List.Add(new TestScene()
            {
                Name = "plane bump back center rotate 5",
                Path = "Bump", 
                Index = 140,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back center rotate 6",
                Path = "Bump", 
                Index = 141,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved rotate 1",
                Path = "Bump", 
                Index = 142,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved rotate 2",
                Path = "Bump", 
                Index = 143,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(180);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved rotate 3",
                Path = "Bump", 
                Index = 144,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundRight(180);
                    scene.RenderableObjects["plane"].RotateAroundForward(-30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved rotate 4",
                Path = "Bump", 
                Index = 145,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved rotate 5",
                Path = "Bump", 
                Index = 146,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(-30);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "plane bump back moved rotate 6",
                Path = "Bump", 
                Index = 147,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    scene.RenderableObjects["plane"].RotateAroundForward(180);
                    scene.RenderableObjects["plane"].RotateAroundUp(10);
                    scene.RenderableObjects["plane"].RotateAroundRight(30);
                    scene.RenderableObjects["plane"].RotateAroundForward(30);
                    return scene;
                }
            });
        }

        private static void Generate_0170_0179()
        {
            List.Add(new TestScene()
            {
                Name = "sphere bump",
                Path = "Bump", 
                Index = 170,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(false);
                    Fast(scene);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere bump moved",
                Path = "Bump", 
                Index = 171,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(true);
                    Fast(scene);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere bump moved rotate 1",
                Path = "Bump", 
                Index = 172,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(true);
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundUp(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere bump moved rotate 2",
                Path = "Bump", 
                Index = 173,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(true);
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundRight(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere bump moved rotate 3",
                Path = "Bump", 
                Index = 174,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(true);
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundForward(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere bump moved rotate 4",
                Path = "Bump", 
                Index = 175,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(true);
                    Fast(scene);
                    scene.RenderableObjects["sphere"].RotateAroundForward(10);
                    scene.RenderableObjects["sphere"].RotateAroundRight(10);
                    scene.RenderableObjects["sphere"].RotateAroundUp(10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "sphere bump inside",
                Path = "Bump", 
                Index = 176,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Inside();
                    Fast(scene);
                    scene.RenderableObjects[0].DefaultMaterial = TestMaterials.BumpCircle("BumpCircle");
                    Layer.SetScale(scene.RenderableObjects[0].DefaultMaterial.Diffuse as Layer,
                        new Vector2(0.15, 0.15));
                    Layer.SetScale(scene.RenderableObjects[0].DefaultMaterial.Tangents as Layer,
                        new Vector2(0.15, 0.15));
                    scene.RenderableObjects[0].RotateAroundUp(180);
                    scene.Lights["light"].Pos = new Vector3(0, 1.1, 1.65);
                    scene.ActiveCamera.RotateAroundRight(-20);
                    (scene.ActiveCamera as PerspectiveCamera).MinimalPlaneDistant = 2.8;
                    return scene;
                }
            });
        }

        private static void Generate_0190_0199()
        {
            List.Add(new TestScene()
            {
                Name = "earth bump",
                Path = "Bump", 
                Index = 190,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Bump(true);
                    scene.RenderableObjects["sphere"].DefaultMaterial = TestMaterials.EarthBump("earth");
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "earth bump inside",
                Path = "Bump", 
                Index = 191,
                GetScene = () =>
                {
                    Scene scene = Scenes.Sphere_Inside();
                    Fast(scene);
                    scene.RenderableObjects[0].DefaultMaterial.ReflectionTransmittance = null;
                    scene.RenderableObjects[0].DefaultMaterial = TestMaterials.EarthBump("earth");
                    scene.RenderableObjects[0].RotateAroundUp(180);
                    scene.Lights["light"].Pos = new Vector3(0, 1.4, 1);
                    scene.ActiveCamera.RotateAroundRight(-20);
                    return scene;
                }
            });
        }

        private static void Generate_0200_0209()
        {
            List.Add(new TestScene()
            {
                Name = "layer rotate 2d",
                Index = 200,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);

                    Layer.InsertBefore(scene.RenderableObjects["plane"].DefaultMaterial,
                        scene.RenderableObjects["plane"].DefaultMaterial.Tangents as Layer,
                        LayersFactory.Transform(null,
                        Matrix3.CreateRotate(20)));
                    Layer.InsertBefore(scene.RenderableObjects["plane"].DefaultMaterial,
                        scene.RenderableObjects["plane"].DefaultMaterial.Diffuse as Layer,
                        LayersFactory.Transform(null,
                        Matrix3.CreateRotate(20)));
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "layer scale 2d",
                Index = 201,
                GetScene = () =>
                {
                    Scene scene = Scenes.Plane_Bump(false);
                    Layer.InsertBefore(scene.RenderableObjects["plane"].DefaultMaterial,
                        scene.RenderableObjects["plane"].DefaultMaterial.Tangents as Layer,
                        LayersFactory.Scale(null,
                        new Vector2(2, 1)));
                    Layer.InsertBefore(scene.RenderableObjects["plane"].DefaultMaterial,
                        scene.RenderableObjects["plane"].DefaultMaterial.Diffuse as Layer,
                        LayersFactory.Scale(null,
                        new Vector2(2, 1)));
                    return scene;
                }
            });
        }

        private static void Generate_0230_0239()
        {
            List.Add(new TestScene()
            {
                Name = "earth on triangles",
                Index = 230,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Earth();
                    Fast(scene);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles",
                Index = 231,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "two_mirrors_no_ambient",
                Index = 232,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Earth();
                    scene.RenderOptions.AmbientColor = ColorFloat.Black;
                    Fast(scene);
                    scene.Lights.Remove("light2");
                    scene.Lights.Remove("light3");
                    scene.Lights.Remove("light4");
                    scene.Lights["light1"].Pos = new Vector3(0, 0, -10);
                    scene.Lights["light1"].Color = new ColorFloat(1);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.OneSide = false;
                    t1.DefaultMaterial = TestMaterials.Shiny("blue", ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.ReflectionTransmittance = VolumesFactory.Solid(0.6);
                    t2.DefaultMaterial = t1.DefaultMaterial;
                    t1.DefaultMaterial.SpecularHighlight = null;
                    t2.DefaultMaterial.SpecularHighlight = null;
                    scene.RenderableObjects["plane"].DefaultMaterial.SpecularHighlight = null;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "two_mirrors_ambient",
                Index = 233,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Earth();
                    scene.RenderOptions.AmbientColor = new ColorFloat(0.25);
                    Fast(scene);
                    scene.Lights.Remove("light2");
                    scene.Lights.Remove("light3");
                    scene.Lights.Remove("light4");
                    scene.Lights["light1"].Pos = new Vector3(0, 0, -10);
                    scene.Lights["light1"].Color = new ColorFloat(1);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.OneSide = false;
                    t1.DefaultMaterial = TestMaterials.Shiny("blue", ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.ReflectionTransmittance = VolumesFactory.Solid(0.6);
                    t2.DefaultMaterial = t1.DefaultMaterial;
                    t1.DefaultMaterial.SpecularHighlight = null;
                    t2.DefaultMaterial.SpecularHighlight = null;
                    scene.RenderableObjects["plane"].DefaultMaterial.SpecularHighlight = null;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "triangles_normals_no_reflection",
                Index = 234,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Earth();
                    scene.RenderOptions.AmbientColor = new ColorFloat(0.25);
                    Fast(scene);
                    scene.Lights.Remove("light2");
                    scene.Lights.Remove("light3");
                    scene.Lights.Remove("light4");
                    scene.Lights["light1"].Pos = new Vector3(0, 0, -10);
                    scene.Lights["light1"].Color = new ColorFloat(1);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.OneSide = false;
                    t1.DefaultMaterial = TestMaterials.Shiny("blue", ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial = t1.DefaultMaterial;
                    t1.DefaultMaterial.ReflectionTransmittance = null;
                    t2.DefaultMaterial = t1.DefaultMaterial;
                    t1.DefaultMaterial.SpecularHighlight = null;
                    t2.DefaultMaterial.SpecularHighlight = null;
                    scene.RenderableObjects["plane"].DefaultMaterial.SpecularHighlight = null;
                    scene.RenderableObjects["plane"].DefaultMaterial.ReflectionTransmittance = null;
                    t1.N1 = new Vector3(-1, -1, -1);
                    t1.N2 = new Vector3(-1, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "triangles_normals_with_reflection",
                Index = 235,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Earth();
                    scene.RenderOptions.AmbientColor = new ColorFloat(0.25);
                    Fast(scene);
                    scene.Lights.Remove("light2");
                    scene.Lights.Remove("light3");
                    scene.Lights.Remove("light4");
                    scene.Lights["light1"].Pos = new Vector3(0, 0, -10);
                    scene.Lights["light1"].Color = new ColorFloat(1);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.OneSide = false;
                    t1.DefaultMaterial = TestMaterials.Shiny("blue", ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial = t1.DefaultMaterial;
                    t1.DefaultMaterial.SpecularHighlight = null;
                    t2.DefaultMaterial.SpecularHighlight = null;
                    scene.RenderableObjects["plane"].DefaultMaterial.SpecularHighlight = null;
                    scene.RenderableObjects["plane"].DefaultMaterial.ReflectionTransmittance = null;
                    t1.N1 = new Vector3(-1, -1, -1);
                    t1.N2 = new Vector3(-1, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles back",
                Path = "Bump", 
                Index = 236,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    scene.RenderableObjects["t1"].OneSide = false;
                    scene.RenderableObjects["t1"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    scene.RenderableObjects["t2"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles vertices transform 1",
                Path = "Bump", 
                Index = 237,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector3, Vector3> scale = v => new Vector3(v.X / 2, v.Y, v.Z);
                    t1.V1 = scale(t1.V1);
                    t1.V2 = scale(t1.V2);
                    t1.V3 = scale(t1.V3);
                    t2.V1 = scale(t2.V1);
                    t2.V2 = scale(t2.V2);
                    t2.V3 = scale(t2.V3);
                    t1.RotateAroundUp(10);
                    t2.RotateAroundUp(10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, 10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, 10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles vertices transform 2",
                Path = "Bump", 
                Index = 238,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector3, Vector3> scale = v => new Vector3(v.X, v.Y / 2, v.Z);
                    t1.V1 = scale(t1.V1);
                    t1.V2 = scale(t1.V2);
                    t1.V3 = scale(t1.V3);
                    t2.V1 = scale(t2.V1);
                    t2.V2 = scale(t2.V2);
                    t2.V3 = scale(t2.V3);
                    t1.RotateAroundUp(-10);
                    t2.RotateAroundUp(-10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(2, 3, 5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump back on triangles vertices transform 1",
                Path = "Bump", 
                Index = 239,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    scene.RenderableObjects["t1"].OneSide = false;
                    scene.RenderableObjects["t1"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    scene.RenderableObjects["t2"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector3, Vector3> scale = v => new Vector3(v.X / 2, v.Y, v.Z);
                    t1.V1 = scale(t1.V1);
                    t1.V2 = scale(t1.V2);
                    t1.V3 = scale(t1.V3);
                    t2.V1 = scale(t2.V1);
                    t2.V2 = scale(t2.V2);
                    t2.V3 = scale(t2.V3);
                    t1.RotateAroundUp(10);
                    t2.RotateAroundUp(10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, 10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, 10);
                    return scene;
                }
            });
        }

        private static void Generate_0240_0249()
        {
            List.Add(new TestScene()
            {
                Name = "bump back on triangles vertices transform 2",
                Path = "Bump", 
                Index = 240,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    scene.RenderableObjects["t1"].OneSide = false;
                    scene.RenderableObjects["t1"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    scene.RenderableObjects["t2"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector3, Vector3> scale = v => new Vector3(v.X, v.Y / 2, v.Z);
                    t1.V1 = scale(t1.V1);
                    t1.V2 = scale(t1.V2);
                    t1.V3 = scale(t1.V3);
                    t2.V1 = scale(t2.V1);
                    t2.V2 = scale(t2.V2);
                    t2.V3 = scale(t2.V3);
                    t1.RotateAroundUp(-10);
                    t2.RotateAroundUp(-10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(2, 3, 5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles tx transform 1",
                Path = "Bump", 
                Index = 241,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, double, Vector2> scale = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y * s + d);
                    t1.T1 = scale(t1.T1, 0.5, 0.35);
                    t1.T2 = scale(t1.T2, 0.5, 0.35);
                    t1.T3 = scale(t1.T3, 0.5, 0.35);
                    t2.T1 = scale(t2.T1, 0.5, 0.35);
                    t2.T2 = scale(t2.T2, 0.5, 0.35);
                    t2.T3 = scale(t2.T3, 0.5, 0.35);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles tx transform 2",
                Path = "Bump", 
                Index = 242,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, double, Vector2> scalex = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y);
                    Func<Vector2, double, double, Vector2> scaley = (v, s, d) =>
                        new Vector2(v.X, v.Y * s + d);
                    t1.T1 = scalex(t1.T1, 0.5, 0.35);
                    t1.T2 = scalex(t1.T2, 0.5, 0.35);
                    t1.T3 = scalex(t1.T3, 0.5, 0.35);
                    t2.T1 = scaley(t2.T1, 0.5, 0.35);
                    t2.T2 = scaley(t2.T2, 0.5, 0.35);
                    t2.T3 = scaley(t2.T3, 0.5, 0.35);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump back on triangles tx transform 1",
                Path = "Bump", 
                Index = 243,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    scene.RenderableObjects["t1"].OneSide = false;
                    scene.RenderableObjects["t1"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    scene.RenderableObjects["t2"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, double, Vector2> scale = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y * s + d);
                    t1.T1 = scale(t1.T1, 0.5, 0.35);
                    t1.T2 = scale(t1.T2, 0.5, 0.35);
                    t1.T3 = scale(t1.T3, 0.5, 0.35);
                    t2.T1 = scale(t2.T1, 0.5, 0.35);
                    t2.T2 = scale(t2.T2, 0.5, 0.35);
                    t2.T3 = scale(t2.T3, 0.5, 0.35);
                    t1.RotateAroundUp(10);
                    t2.RotateAroundUp(10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, 10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, 10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(2, 3, 5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump back on triangles tx transform 2",
                Path = "Bump", 
                Index = 244,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    scene.RenderableObjects["t1"].OneSide = false;
                    scene.RenderableObjects["t1"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    scene.RenderableObjects["t2"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, double, Vector2> scalex = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y);
                    Func<Vector2, double, double, Vector2> scaley = (v, s, d) =>
                        new Vector2(v.X, v.Y * s + d);
                    t1.T1 = scalex(t1.T1, 0.5, 0.35);
                    t1.T2 = scalex(t1.T2, 0.5, 0.35);
                    t1.T3 = scalex(t1.T3, 0.5, 0.35);
                    t2.T1 = scaley(t2.T1, 0.5, 0.35);
                    t2.T2 = scaley(t2.T2, 0.5, 0.35);
                    t2.T3 = scaley(t2.T3, 0.5, 0.35);
                    t1.RotateAroundUp(-10);
                    t2.RotateAroundUp(-10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(-2, 3, 5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump back on triangles light move",
                Path = "Bump", 
                Index = 245,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    scene.RenderableObjects["t1"].OneSide = false;
                    scene.RenderableObjects["t1"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    scene.RenderableObjects["t2"].RotateAround(Vector3.ZERO,
                        new Vector3(1, 1, 0).Normalized, 180);
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, double, Vector2> scalex = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y);
                    Func<Vector2, double, double, Vector2> scaley = (v, s, d) =>
                        new Vector2(v.X, v.Y * s + d);
                    t1.T1 = scalex(t1.T1, 0.5, 0.35);
                    t1.T2 = scalex(t1.T2, 0.5, 0.35);
                    t1.T3 = scalex(t1.T3, 0.5, 0.35);
                    t2.T1 = scaley(t2.T1, 0.5, 0.35);
                    t2.T2 = scaley(t2.T2, 0.5, 0.35);
                    t2.T3 = scaley(t2.T3, 0.5, 0.35);
                    t1.RotateAroundUp(-10);
                    t2.RotateAroundUp(-10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(-2, 3, 5);
                    scene.Lights[0].Pos += new Vector3(-1, -1, -0.2);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles scale tx",
                Path = "Bump", 
                Index = 246,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, double, Vector2> scalex = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y);
                    Func<Vector2, double, double, Vector2> scaley = (v, s, d) =>
                        new Vector2(v.X, v.Y * s + d);
                    t1.T1 = scalex(t1.T1, 0.5, 0.35);
                    t1.T2 = scalex(t1.T2, 0.5, 0.35);
                    t1.T3 = scalex(t1.T3, 0.5, 0.35);
                    t2.T1 = scaley(t2.T1, 0.5, 0.35);
                    t2.T2 = scaley(t2.T2, 0.5, 0.35);
                    t2.T3 = scaley(t2.T3, 0.5, 0.35);
                    t1.RotateAroundUp(-10);
                    t2.RotateAroundUp(-10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(-2, 3, 5);
                    double ss = 0.33;
                    Layer.SetScale(t1.DefaultMaterial.Diffuse as Layer, new Vector2(ss, ss));
                    Layer.SetScale(t1.DefaultMaterial.Tangents as Layer, new Vector2(ss, ss));
                    Layer.SetScale(t2.DefaultMaterial.Diffuse as Layer, new Vector2(ss, ss));
                    Layer.SetScale(t2.DefaultMaterial.Tangents as Layer, new Vector2(ss, ss));
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles normals",
                Path = "Bump", 
                Index = 247,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.N1 = new Vector3(-5, -1, -1);
                    t1.N2 = new Vector3(-5, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    t1.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    double s = 0.1;
                    Layer.SetScale(t1.DefaultMaterial.Tangents as Layer, new Vector2(s, s));
                    Layer.SetScale(t2.DefaultMaterial.Tangents as Layer, new Vector2(s, s));
                    scene.Lights[0].Pos += new Vector3(0, 0, -2);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "bump on triangles rotate tx",
                Path = "Bump", 
                Index = 248,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    Func<Vector2, double, Vector2> rotate = (v, a) =>
                        Matrix3.CreateRotate(a) * v;
                    Func<Vector2, double, double, Vector2> scalex = (v, s, d) =>
                        new Vector2(v.X * s + d, v.Y);
                    t1.T1 = scalex(t1.T1, 0.35, 0);
                    t1.T2 = scalex(t1.T2, 0.35, 0);
                    t1.T3 = scalex(t1.T3, 0.35, 0);
                    t1.T1 = rotate(t1.T1, 10);
                    t1.T2 = rotate(t1.T2, 10);
                    t1.T3 = rotate(t1.T3, 10);
                    t2.T1 = rotate(t2.T1, 10);
                    t2.T2 = rotate(t2.T2, 10);
                    t2.T3 = rotate(t2.T3, 10);
                    double ss = 0.33;
                    Layer.SetScale(t1.DefaultMaterial.Diffuse as Layer, new Vector2(ss, ss));
                    Layer.SetScale(t1.DefaultMaterial.Tangents as Layer, new Vector2(ss, ss));
                    Layer.SetScale(t2.DefaultMaterial.Diffuse as Layer, new Vector2(ss, ss));
                    Layer.SetScale(t2.DefaultMaterial.Tangents as Layer, new Vector2(ss, ss));
                    return scene;
                }
            });
        }

        private static void Generate_0270_0279()
        {
            List.Add(new TestScene()
            {
                Name = "rotate triangle around vector 1",
                Path = "Transforms", 
                Index = 270,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.N1 = new Vector3(-5, -1, -1);
                    t1.N2 = new Vector3(-5, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    t1.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.Tangents = null;
                    t2.DefaultMaterial.Tangents = null;
                    scene.Lights[0].Pos += new Vector3(0, 0, -200);
                    t1.OneSide = false;
                    t1.RotateAroundUp(10);
                    t2.RotateAroundUp(10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(2, 3, 5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "rotate triangle around vector 2",
                Path = "Transforms", 
                Index = 271,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.N1 = new Vector3(-5, -1, -1);
                    t1.N2 = new Vector3(-5, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    t1.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.Tangents = null;
                    t2.DefaultMaterial.Tangents = null;
                    scene.Lights[0].Pos += new Vector3(0, 0, -200);
                    t1.OneSide = false;
                    t1.RotateAround(Vector3.ZERO, new Vector3(0, 1, 0).Normalized, 180);
                    t2.RotateAround(Vector3.ZERO, new Vector3(0, 1, 0).Normalized, 180);
                    t1.RotateAroundUp(10);
                    t2.RotateAroundUp(10);
                    t1.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    t2.RotateAround(Vector3.ZERO, Vector3.YAXIS, -10);
                    foreach (var ele in scene.Actors)
                        ele.Pos += new Vector3(2, 3, 5);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "rotate triangle around vector 3",
                Path = "Transforms", 
                Index = 272,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.N1 = new Vector3(-5, -1, -1);
                    t1.N2 = new Vector3(-5, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    t1.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.Tangents = null;
                    t2.DefaultMaterial.Tangents = null;
                    scene.Lights[0].Pos += new Vector3(0, 0, -200);
                    t1.OneSide = false;
                    t1.RotateAround(new Vector3(-2, -2, 0), new Vector3(0, 0, 1), 10);
                    t2.RotateAround(new Vector3(-2, -2, 0), new Vector3(0, 0, 1), 10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "rotate triangle around vector 4",
                Path = "Transforms", 
                Index = 273,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.N1 = new Vector3(-5, -1, -1);
                    t1.N2 = new Vector3(-5, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    t1.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.Tangents = null;
                    t2.DefaultMaterial.Tangents = null;
                    scene.Lights[0].Pos += new Vector3(0, 0, -200);
                    t1.OneSide = false;
                    t1.RotateAround(new Vector3(-2, -2, 0), new Vector3(0, 0, 1), -10);
                    t2.RotateAround(new Vector3(2, 2, 0), new Vector3(0, 0, 1), 10);
                    return scene;
                }
            });

            List.Add(new TestScene()
            {
                Name = "rotate triangle around vector 4",
                Path = "Transforms", 
                Index = 274,
                GetScene = () =>
                {
                    Scene scene = Scenes.Triangles_Bump();
                    var t1 = scene.RenderableObjects["t1"] as TriangleObject;
                    var t2 = scene.RenderableObjects["t2"] as TriangleObject;
                    t1.N1 = new Vector3(-5, -1, -1);
                    t1.N2 = new Vector3(-5, 1, -1);
                    t1.N3 = new Vector3(1, 1, -1);
                    t2.N1 = t1.N3;
                    t2.N2 = new Vector3(1, -1, -1);
                    t2.N3 = t1.N1;
                    t1.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t2.DefaultMaterial.Diffuse = VolumesFactory.Solid(ColorFloat.SRGB_Blue);
                    t1.DefaultMaterial.Tangents = null;
                    t2.DefaultMaterial.Tangents = null;
                    scene.Lights[0].Pos += new Vector3(0, 0, -200);
                    t1.OneSide = false;
                    foreach (var ele in scene.Actors)
                        ele.RotateAround(new Vector3(3, 4, -5), new Vector3(2, 3, 5), 34);
                    return scene;
                }
            });
        }
    }
}